<template>
	<view class="box">
		<uNavbar title="数字身份卡" bgColor="#2E2E2E"  leftIconColor="#ffffff"></uNavbar>
		<view class="NFT flex_ZC" @click="goNextPage">
			<image class="tupians" :src="infoDetail.goods_image" mode="aspectFill"></image>
			<view class="NFT_name flex_ld">
				<text>{{infoDetail.goods_name}}</text>
			</view>
			<view class="NFT_name flex_ld" style="margin-top: 30rpx;">
				<view class="NFT_btm_r flex_dq"> 
					<view class="sign flex_dq">
						<view class="sign_l flex_c">
							<text>系列</text>
						</view>
						<text>{{goodsSeries.series_name}}</text>
					</view>
					<view class="sign flex_dq">
						<view class="sign_l flex_c">
							<text>限量</text>
						</view>
						<text>{{infoDetail.circulation}}份</text>
					</view>
				</view>
			</view>
			<view class="money_wrap">
				<!-- <view class="money flex_dq">
					<image src="../../static/image/i_ful.png" mode=""></image>
					<text>50000.00</text>
				</view> -->
				<view class="money flex_dq" style="margin-top: 10rpx;">
					<image src="../../static/icon/i_money.png" mode=""></image>
					<text>{{infoDetail.price}}</text>
				</view>
			</view>
		</view>
		<!-- <view class="btn" @click="goNextPage">
			申请加入
		</view> -->

	</view>
</template>

<script>
	import {
		goodsInfo
	} from "../../api/store.js";
	export default {
		data() {
			return {
				ids: '',
				infoDetail: {},
				goodsSeries:{}
			}
		},
		onLoad(e) {
			console.log(e);
			this.ids = e.id
			this.isGoodsInfo()
		},
		methods: {
			// 初始化详情
			isGoodsInfo() {
				let data = {
					id: this.ids,
				};
				goodsInfo(data).then(res => {
					console.log(res);
					if(res.code == 1){
						this.goodsSeries = res.data.goods_series
						this.infoDetail = res.data
					}
				})
			},
			goNextPage() {
				uni.navigateTo({
					url: '/pagesMy/mallCenter/productDetails?id=' + this.infoDetail.id + '&identityCard=' + true
				})
			}

		},
	}
</script>

<style lang="scss" scoped>
	@font-face {
		font-family: 'iconfont2';
		src: url("~@/iconfont/YouSheBiaoTiHei.ttf");
	}

	.box {
		width: 750rpx;
		height: 100vh;
		background-color: #2E2E2E;
		position: relative;
	}

	.tab-nav {
		width: 750rpx;
		height: 100rpx;
		background-color: #2E2E2E;
		// margin-left: 20rpx;
		display: flex;
		align-items: center;
		position: fixed;
		z-index: 999;

		.tab-list-item {
			position: relative;
			width: 350rpx;

			.text {
				display: flex;
				justify-content: center;
				align-items: center;
				margin-left: 50rpx;
				padding: 20rpx;
				height: 52rpx;
				opacity: 1;
				font-weight: 400;
				text-align: center;
				font-size: 32rpx;
				color: #A6A5AF;
			}

			.active {
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 400;
				color: #FFFFFF;
			}
		}
	}

	.NFT {
		position: relative;
		width: 690rpx;
		height: 846rpx;
		background: #B7A184;
		border: 2rpx solid #B7A184;
		margin: 40rpx auto;
		border-radius: 40rpx;
		padding-bottom: 10rpx;
	}

	.money_wrap {
		position: absolute;
		right: 10rpx;
		bottom: 44rpx;
	}

	.NFT>image {
		width: 650rpx;
		height: 650rpx;
		margin-top: 20rpx;
		border-radius: 30rpx;
	}

	.NFT>text {
		position: absolute;
		top: 20rpx;
		right: 18rpx;
		height: 54rpx;
		line-height: 54rpx;
		background: #221F3A80;
		font-size: 28rpx;
		color: #DFA1ED;
		text-align: center;
		padding: 0 10rpx;
		border-radius: 0 20rpx 0 0;
	}

	.NFT_btm {
		width: 100%;
		/* background: pink; */
		margin-top: 32rpx;
	}

	.NFT_btm_l {
		font-size: 32rpx;
		color: #ffffff;
		margin: 0 20rpx;
	}

	.NFT_btm_l>image {
		width: 52rpx;
		height: 52rpx;
		border-radius: 50%;
		margin-right: 16rpx;
	}


	.sign {
		font-size: 22rpx;
		background: #c3b39f;
		border-radius: 20rpx 10rpx 10rpx 20rpx;
		color: #ffffff;
		/* padding-right: 20rpx; */
		margin-right: 20rpx;
	}

	.sign>text {
		margin-left: 6rpx;
		padding-right: 10rpx;
		padding-bottom: 2rpx;
	}

	.sign_l {
		color: #ffffff;
		font-size: 22rpx;
		width: 60rpx;
		padding: 4rpx 0 6rpx 0;
		border-radius: 10rpx 0 0 10rpx;
		background: #997F5C;
	}

	.sign>text {
		margin-left: 10rpx;
	}

	.NFT_name {
		width: 100%;
		color: #ffffff;
		font-size: 40rpx;
		margin-top: 10rpx;
	}

	.NFT_name>text:nth-child(1) {
		margin-left: 20rpx;
		text-overflow:ellipsis;
		display:-webkit-box;
		-webkit-box-orient:vertical; 
		-webkit-line-clamp:2; 
		overflow:hidden; 
	}
	.NFT_btm_r{
		margin-left: 20rpx;
	}
	.money {
		color: #ffffff;
		font-size: 44rpx;
		font-family: iconfont2;
		margin-right: 32rpx;
	}
	.money>image{
		width: 40rpx;
		height: 40rpx;
		margin-right: 10rpx;
	}
	.btn {
		width: 682rpx;
		height: 88rpx;
		background: linear-gradient(274deg, #0014FF 0%, #8020EF 50%, #FF2CDF 100%);
		border-radius: 26rpx 26rpx 26rpx 26rpx;
		margin: 0 auto;
		text-align: center;
		line-height: 88rpx;
		font-weight: 400;
		font-size: 36rpx;
		color: #FFFFFF;
		position: absolute;
		bottom: 50rpx;
		left: 30rpx;
	}
	/deep/.u-navbar__content__title{
		color: #ffffff !important;
	}
</style>